<%@ Page Language="C#" MasterPageFile="~/asp_pages/Master.master" AutoEventWireup="true" CodeFile="ShoppingCart.aspx.cs" Inherits="asp_pages_ShoppingCart" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headPlaceHolder" Runat="Server">
<link rel="stylesheet" type="text/css" href="../styles/shopping_cart.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    &nbsp;<br />
    <h3>Shopping cart:</h3>
    <asp:GridView ID="grvShoppingCart" CssClass="tblCart" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="grvShoppingCart_RowCancelingEdit" OnRowEditing="grvShoppingCart_RowEditing" OnRowUpdating="grvShoppingCart_RowUpdating">
        <Columns>
            <asp:TemplateField>
                <EditItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Item">            
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Price">         
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Price") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Quantity">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Width="50px" Text='<%# Bind("Quantity") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Width="50px" Text='<%# Bind("Quantity") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Amount">            
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Amount") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" >
                <ItemStyle Width="120px" />
            </asp:CommandField>
        </Columns>
    </asp:GridView>
    <br />
    Totals:
    <asp:Label ID="lblTotal" runat="server"></asp:Label><br />
    <asp:LinkButton ID="lnkRemove" runat="server">Remove selected items</asp:LinkButton>
    <asp:LinkButton ID="lnkCheckOut" runat="server" OnClick="LinkButton1_Click" PostBackUrl="CheckOut.aspx">Check out</asp:LinkButton><br />
    <br />
    <asp:Panel ID="pnlAdd" runat="server">
    <table id="tblAdd">
        <tr>
            <td style="width: 125px">
                <asp:Label ID="Label1" runat="server" Text="Item name:" Width="125px"></asp:Label></td>
            <td style="width: 154px">
                <asp:Label ID="lblItemName" runat="server"></asp:Label></td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 125px; height: 21px;">
                <asp:Label ID="Label2" runat="server" Text="Price:"></asp:Label></td>
            <td style="width: 154px; height: 21px;">
                <asp:Label ID="lblPrice" runat="server"></asp:Label></td>
            <td style="width: 100px; height: 21px;">
            </td>
        </tr>
        <tr>
            <td style="width: 125px; height: 26px;">
                <asp:Label ID="Label3" runat="server" Text="Quantity:"></asp:Label></td>
            <td style="width: 154px; height: 26px;">
                <asp:TextBox ID="txtQuantity" runat="server"></asp:TextBox></td>
            <td style="width: 100px; height: 26px;">
            </td>
        </tr>
        <tr>
            <td style="width: 125px; height: 26px;">
            </td>
            <td style="width: 154px; height: 26px;">
                <asp:Button ID="btnAccept" runat="server" Text="Accept" OnClick="btnAccept_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" /></td>
            <td style="width: 100px; height: 26px;">
            </td>
        </tr>
    </table></asp:Panel>
    <br />
</asp:Content>

